function e(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}

function a(e) {
    var a = this, t = e.target.dataset.src, r = e.target.dataset.from;
    void 0 !== r && r.length > 0 && wx.previewImage({
        current: t,
        urls: a.data[r].imageUrls
    });
}

function t(e) {
    return !1;
}

var r = e(require("./showdown.js")), i = e(require("./html2json.js"));

module.exports = {
    wxParse: function() {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "wxParseData", n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "html", s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : '<div class="color:red;">数据不能为空</div>', o = arguments[3], d = arguments[4], l = o, m = {};
        if ("html" == n) m = i.default.html2json(s, e); else if ("md" == n || "markdown" == n) {
            var u = new r.default.Converter().makeHtml(s);
            m = i.default.html2json(u, e);
        }
        m.view = {}, m.view.imagePadding = 0, void 0 !== d && (m.view.imagePadding = d);
        var v = {};
        v[e] = m, l.setData(v), l.wxParseImgLoad = t, l.wxParseImgTap = a;
    },
    wxParseTemArray: function(e, a, t, r) {
        for (var i = [], n = r.data, s = null, o = 0; o < t; o++) {
            var d = n[a + o].nodes;
            i.push(d);
        }
        e = e || "wxParseTemArray", (s = JSON.parse('{"' + e + '":""}'))[e] = i, r.setData(s);
    },
    emojisInit: function() {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "/wxParse/emojis/", t = arguments[2];
        i.default.emojisInit(e, a, t);
    }
};